class ZjzxContractModel {
  int code;
  Data data;
  String msg;
  String requestId;

  ZjzxContractModel({this.code, this.data, this.msg, this.requestId});

  ZjzxContractModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    msg = json['msg'];
    requestId = json['requestId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    data['msg'] = this.msg;
    data['requestId'] = this.requestId;
    return data;
  }
}

class Data {
  int current;
  int pages;
  List<Records> records;
  bool searchCount;
  int size;
  int total;

  Data(
      {this.current,
      this.pages,
      this.records,
      this.searchCount,
      this.size,
      this.total});

  Data.fromJson(Map<String, dynamic> json) {
    current = json['current'];
    pages = json['pages'];
    if (json['records'] != null) {
      records = new List<Records>();
      json['records'].forEach((v) {
        records.add(new Records.fromJson(v));
      });
    }
    searchCount = json['searchCount'];
    size = json['size'];
    total = json['total'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['current'] = this.current;
    data['pages'] = this.pages;
    if (this.records != null) {
      data['records'] = this.records.map((v) => v.toJson()).toList();
    }
    data['searchCount'] = this.searchCount;
    data['size'] = this.size;
    data['total'] = this.total;
    return data;
  }
}

class Records {
  int agreedDuration;//约定工期 (天)
  num businessCommission;//预计商务提成（元）
  num businessRatio;//商务提成比例 (%)
  String city;
  String cityCode;
  num contractAmount;//合同金额（元）
  String contractCode;//合同编号
  String contractFile;//预授权合同
  List<ContractFiles> contractFiles;
  String contractName;//合同名称
  int createId;//创建用户id
  String createTime;//创建日期
  String createUser;//签订人
  String customerAddress;//客户通讯地址
  String customerName;//客户名称
  String customerPrincipal;//客户联系人
  String customerTel;//客户联系电话
  List<DeliverFiles> deliverFiles;
  String dispatchDate;//派单日期
  String dispatchUser;//派单用户名称
  int dispatchUserId;//派单用户id
  String district;//区
  String districtCode;//区code
  String endTime;//结束时间
  String id;
  String industryType;//行业类别
  String industryTypeCode;//行业类别code
  num nationalOperationRatio;//全国运营中心比例 (%)
  String orderTime;//接单时间
  num platformRatio;//平台比例 (%)
  String projectRequirements;//项目要求
  String projectType;//项目类型
  String projectTypeCode;//项目类型code
  String province;//省
  String provinceCode;//省code
  num regionalOperationRatio;//区域运营中心比例 (%)
  String releaseTime;//发布时间
  num serviceOperationRatio;//服务体验中心比例 (%)
  String serviceType;//业务类型
  String serviceTypeCode;//业务类型code
  String signingDate;//签订日期
  String status;//状态
  String statusName;//状态中文
  int supplierId;//供应商id
  String supplierName;//供应商
  int updateId;//修改用户id
  String updateTime;//修改日期
  String division;//事业部名称
  String rejectReason;// 拒单原因
  String divisionCode;
  Records(
      {this.agreedDuration,
      this.businessCommission,
      this.businessRatio,
      this.city,
      this.cityCode,
      this.contractAmount,
      this.contractCode,
      this.contractFile,
      this.contractFiles,
      this.contractName,
      this.createId,
      this.createTime,
      this.createUser,
      this.customerAddress,
      this.customerName,
      this.customerPrincipal,
      this.customerTel,
      this.deliverFiles,
      this.dispatchDate,
      this.dispatchUser,
      this.dispatchUserId,
      this.district,
      this.districtCode,
      this.endTime,
      this.id,
        this.divisionCode,
      this.industryType,
      this.industryTypeCode,
      this.nationalOperationRatio,
      this.orderTime,
      this.platformRatio,
      this.projectRequirements,
      this.projectType,
      this.projectTypeCode,
      this.province,
      this.provinceCode,
      this.regionalOperationRatio,
      this.releaseTime,
      this.serviceOperationRatio,
      this.serviceType,
      this.serviceTypeCode,
      this.signingDate,
      this.status,
      this.statusName,
      this.supplierId,
      this.supplierName,
      this.updateId,
      this.updateTime,
      this.division,
      this.rejectReason});

  Records.fromJson(Map<String, dynamic> json) {
    agreedDuration = json['agreedDuration'];
    businessCommission = json['businessCommission'];
    businessRatio = json['businessRatio'];
    city = json['city'];
    divisionCode = json['divisionCode'];
    cityCode = json['cityCode'];
    contractAmount = json['contractAmount'];
    contractCode = json['contractCode'];
    contractFile = json['contractFile'];
    if (json['contractFiles'] != null) {
      contractFiles = new List<ContractFiles>();
      json['contractFiles'].forEach((v) {
        contractFiles.add(new ContractFiles.fromJson(v));
      });
    }
    contractName = json['contractName'];
    createId = json['createId'];
    createTime = json['createTime'];
    createUser = json['createUser'];
    customerAddress = json['customerAddress'];
    customerName = json['customerName'];
    customerPrincipal = json['customerPrincipal'];
    customerTel = json['customerTel'];
    if (json['deliverFiles'] != null) {
      deliverFiles = new List<DeliverFiles>();
      json['deliverFiles'].forEach((v) {
        deliverFiles.add(new DeliverFiles.fromJson(v));
      });
    }
    dispatchDate = json['dispatchDate'];
    dispatchUser = json['dispatchUser'];
    dispatchUserId = json['dispatchUserId'];
    district = json['district'];
    districtCode = json['districtCode'];
    endTime = json['endTime'];
    id = json['id'];
    industryType = json['industryType'];
    industryTypeCode = json['industryTypeCode'];
    nationalOperationRatio = json['nationalOperationRatio'];
    orderTime = json['orderTime'];
    platformRatio = json['platformRatio'];
    projectRequirements = json['projectRequirements'];
    projectType = json['projectType'];
    projectTypeCode = json['projectTypeCode'];
    province = json['province'];
    provinceCode = json['provinceCode'];
    regionalOperationRatio = json['regionalOperationRatio'];
    releaseTime = json['releaseTime'];
    serviceOperationRatio = json['serviceOperationRatio'];
    serviceType = json['serviceType'];
    serviceTypeCode = json['serviceTypeCode'];
    signingDate = json['signingDate'];
    status = json['status'];
    statusName = json['statusName'];
    supplierId = json['supplierId'];
    supplierName = json['supplierName'];
    updateId = json['updateId'];
    updateTime = json['updateTime'];
    division = json['division'];
    rejectReason = json['rejectReason'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['agreedDuration'] = this.agreedDuration;
    data['businessCommission'] = this.businessCommission;
    data['businessRatio'] = this.businessRatio;
    data['city'] = this.city;
    data['cityCode'] = this.cityCode;
    data['contractAmount'] = this.contractAmount;
    data['contractCode'] = this.contractCode;
    data['contractFile'] = this.contractFile;
    if (this.contractFiles != null) {
      data['contractFiles'] =
          this.contractFiles.map((v) => v.toJson()).toList();
    }
    data['contractName'] = this.contractName;
    data['createId'] = this.createId;
    data['createTime'] = this.createTime;
    data['createUser'] = this.createUser;
    data['customerAddress'] = this.customerAddress;
    data['customerName'] = this.customerName;
    data['customerPrincipal'] = this.customerPrincipal;
    data['customerTel'] = this.customerTel;
    if (this.deliverFiles != null) {
      data['deliverFiles'] = this.deliverFiles.map((v) => v.toJson()).toList();
    }
    data['dispatchDate'] = this.dispatchDate;
    data['dispatchUser'] = this.dispatchUser;
    data['dispatchUserId'] = this.dispatchUserId;
    data['district'] = this.district;
    data['districtCode'] = this.districtCode;
    data['endTime'] = this.endTime;
    data['id'] = this.id;
    data['industryType'] = this.industryType;
    data['industryTypeCode'] = this.industryTypeCode;
    data['nationalOperationRatio'] = this.nationalOperationRatio;
    data['orderTime'] = this.orderTime;
    data['platformRatio'] = this.platformRatio;
    data['projectRequirements'] = this.projectRequirements;
    data['projectType'] = this.projectType;
    data['projectTypeCode'] = this.projectTypeCode;
    data['province'] = this.province;
    data['provinceCode'] = this.provinceCode;
    data['regionalOperationRatio'] = this.regionalOperationRatio;
    data['releaseTime'] = this.releaseTime;
    data['serviceOperationRatio'] = this.serviceOperationRatio;
    data['serviceType'] = this.serviceType;
    data['serviceTypeCode'] = this.serviceTypeCode;
    data['signingDate'] = this.signingDate;
    data['status'] = this.status;
    data['statusName'] = this.statusName;
    data['supplierId'] = this.supplierId;
    data['supplierName'] = this.supplierName;
    data['updateId'] = this.updateId;
    data['updateTime'] = this.updateTime;
    data['division'] = this.division;
    data['rejectReason'] = this.rejectReason;
    return data;
  }
}

class ContractFiles {
  String fileName;//文件名称
  String filePath;//文件地址
  String fileType;//文件类型
  int id;
  String remark;//备注

  ContractFiles(
      {this.fileName, this.filePath, this.fileType, this.id, this.remark});

  ContractFiles.fromJson(Map<String, dynamic> json) {
    fileName = json['fileName'];
    filePath = json['filePath'];
    fileType = json['fileType'];
    id = json['id'];
    remark = json['remark'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['fileName'] = this.fileName;
    data['filePath'] = this.filePath;
    data['fileType'] = this.fileType;
    data['id'] = this.id;
    data['remark'] = this.remark;
    return data;
  }
}
class DeliverFiles {
  String fileName;
  String filePath;
  String fileType;
  int id;
  String remark;

  DeliverFiles(
      {this.fileName, this.filePath, this.fileType, this.id, this.remark});

  DeliverFiles.fromJson(Map<String, dynamic> json) {
    fileName = json['fileName'];
    filePath = json['filePath'];
    fileType = json['fileType'];
    id = json['id'];
    remark = json['remark'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['fileName'] = this.fileName;
    data['filePath'] = this.filePath;
    data['fileType'] = this.fileType;
    data['id'] = this.id;
    data['remark'] = this.remark;
    return data;
  }
}

